package com.shuai.user.service.inner;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.shuai.common.service.InnerInterfaceInfoService;
import com.shuai.user.domain.entity.InterfaceInfo;
import com.shuai.user.service.InterfaceInfoService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author bxs
 * @version 1.0
 * @Date 2024/8/3
 */
@Service
@DubboService
public class InnerInterfaceInfoServiceImpl implements InnerInterfaceInfoService {
    @Autowired
    private InterfaceInfoService interfaceInfoService;

    @Override
    public Long getInterfaceId(String interfaceName) {
        LambdaQueryWrapper<InterfaceInfo> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(InterfaceInfo::getApiName, interfaceName);
        InterfaceInfo one = interfaceInfoService.getOne(queryWrapper);
        return one.getId();
    }
}
